<?php
    if(isset($data['news'])){ $news = $data['news']; }
    if(isset($data['categories'])){ $categories = $data['categories']; }
    if(isset($data['tags'])){ $tags = $data['tags']; }
 ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8">
    <title>Новости</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link href="/public/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="/public/style/style_front.css" rel="stylesheet">
    
  </head>
  <body>
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          
          <a class="brand" href="/admin">Что бы зайти в админку вбей /admin или щелкни сюда</a>
        
        </div>
      </div>
    </div>
    <div class="container-fluid">
      <div class="row-fluid">
        <div class="span3">
          
          <div class="well sidebar-nav">
            <ul class="nav nav-list">
              <li class="nav-header">Категории</li>
               <?php foreach ($categories as $key => $value) { ?>
                  <li><a href="/?<?=$value['cat_id']?>"><?=htmlspecialchars($value['name'])?>
                  <span class="count_news">(<?=$value['count_news']?>)</span></a></li>
                <?}?>
            </ul>
          </div><!--/.well -->
          
           <div class="well sidebar-nav">
            <ul class="nav nav-list">
              <li class="nav-header">Теги</li>
                <?php include 'application/views/tags.php' ?>
            </ul>
          </div><!--/.well -->
        
        </div><!--/span-->
        <div class="span9">
            <?php include 'application/views/'.$content_view;?>
        </div><!--/span-->
      </div><!--/row-->

      <hr>

      <footer>
        <p>&copy; Sergey Bondarenko</p>
      </footer>

    </div>

  </body>
</html>